home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 37 / 037.d81 / 1000 miler (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  11KB  |  391 lines

  1. 45 dimb$(106),c$(106),a$(7,2),s%(8,2),h%(8,2)
  2. 50 gosub2350
  3. 60 poke249,224:poke250,204:poke251,0:poke252,64:poke253,0:poke254,0
  4. 70 poke255,0:sys51462:sys51459
  5. 80 :
  6. 90 te=50759:sp$="[160]                                    ":s=54272
  7. 92 forx=stos+24:pokex,.:next:pokes+24,15
  8. 100 p1=1:p2=2:co=1:zy=1
  9. 110 :
  10. 120 s%(5,1)=1:s%(5,2)=1
  11. 130 fori=1to106:readb$(i):next:zz=106:gosub1150:poke53280,6
  12. 140 sh=48:xp=2:yp=0:gosub2220
  13. 150 syste,"200",267,25:syste,"200",267,137
  14. 160 syste,"0000",136,57:syste,"0000",136,169
  15. 170 fori=1to2:xx(i)=93:ml(i)=0
  16. 180 sl(i)=200:h%(2,i)=1:p(i)=1:m$(i)="000"
  17. 190 forl=1to6:a$(l,i)=c$(co):co=co+1:next:forl=1to6
  18. 200 ifleft$(a$(l,i),1)<>"3"then230
  19. 210 lf=val(mid$(a$(l,i),2,1)):s%(lf,i)=1:gosub1940
  20. 220 a$(l,i)=c$(co):co=co+1:goto200
  21. 230 next:p1=2
  22. 240 sh=46:xp=2:yp=0:gosub2220:sh=49:yp=14:gosub2220
  23. 250 next
  24. 260 p1=1
  25. 270 sh=47:xp=2:yp=14:gosub2220:sh=48:yp=0:gosub2220
  26. 280 a$(7,p1)=c$(co):gosub1130:ifleft$(a$(7,p1),1)<>"3"then300
  27. 290 lf=val(mid$(a$(7,p1),2,1)):s%(lf,p1)=1:l=6:gosub1940:goto280
  28. 300 ifp1=2andnp=1then550
  29. 310 ifnp=2thensyste,"hit any key to view cards",7*8,104:poke198,0:wait198,1:poke198,0
  30. 320 syste,sp$,16,104:gosub1790
  31. 330 syste,"(d)iscard  (p)lay card  (q)uit",4*8,104
  32. 340 gosub2190:syste,sp$,16,104
  33. 350 ifx$<>"p"andx$<>"q"andx$<>"d"then330
  34. 360 ifx$="q"then2080
  35. 370 syste,"which one (1-7) or 0 to end",4*8,104
  36. 380 poke198,0:wait198,1:gety$:syste,sp$,16,104
  37. 390 y=val(y$):remgetoffwhichone?
  38. 400 ify>7ory<1then330
  39. 410 gosub1820:ifx$<>"d"then430
  40. 420 b$(zy)=a$(y,p1):zy=zy+1:gosub700:goto650
  41. 430 le$=left$(a$(y,p1),1):lf=val(mid$(a$(y,p1),2,1))
  42. 440 fl=0:ifle$="4"andp(p1)=0andlf*25<=sl(p1)andml(p1)+lf*25<1001thenfl=1
  43. 450 iffl=1thenforl=1tolf:gosub1850:next:gosub700:goto650
  44. 460 fl=0:ifle$="1"andp(p2)=0ands%(lf,p2)=0thenfl=1
  45. 470 ifle$="1"andp(p2)=0ands%(2,p2)=0andlf=5andsl(p2)=200thenfl=1
  46. 480 iffl=1thenh%(lf,p2)=1:onlfgosub1470,1380,1550,1300,1630
  47. 490 iffl=1thengosub700:goto650
  48. 500 fl=0:ifle$="2"andh%(lf,p1)=1andlf<5thenfl=1
  49. 510 ifle$="2"andlf=5andh%(5,p1)=1andp(p1)=0thenfl=1
  50. 520 iffl=1thenh%(lf,p1)=0:onlfgosub1510,1420,1590,1340,1710
  51. 530 iffl=1thengosub700:goto650
  52. 540 fora=1to20:poke54296,.:poke54296,15:next:goto320
  53. 550 q=0:ifml(p2)-ml(p1)>299thengosub720:gosub800:gosub890:goto970
  54. 560 fl=0:ifp(p1)=1andml(p2)<701andml(p2)-ml(p1)<210thenfl=1
  55. 570 iffl=1thengosub890:gosub720:goto970
  56. 580 fl=0:ifp(p1)=1and(ml(p2)>700orml(p2)-ml(p1)>200)thenfl=1
  57. 590 iffl=1thengosub720:gosub890:goto970
  58. 600 fl=0:ifsl(p1)=75andml(p2)<801andml(p1)-ml(p2)>150thenfl=1
  59. 610 iffl=1thengosub890:gosub800:gosub720:goto970
  60. 620 fl=0:ifsl(p1)=75andml(p2)-ml(p1)>100thenfl=1
  61. 630 iffl=1thengosub720:gosub800:gosub890:goto970
  62. 640 gosub800:gosub720:gosub890:goto970
  63. 650 ifml(p1)=1000then2290:remwinner
  64. 660 ifp1=1thenp1=2:p2=1:sh=46:xp=2:yp=0:gosub2220:sh=49:yp=14:gosub2220:goto280
  65. 670 p1=1:p2=2
  66. 680 sh=47:xp=2:yp=14:gosub2220:sh=48:yp=0:gosub2220
  67. 690 goto280
  68. 700 a$(y,p1)=a$(7,p1):sh=40:xp=32:yp=11:gosub2220
  69. 710 return
  70. 720 ifp(p2)=1orq=1thenreturn
  71. 730 fory=1to7
  72. 740 lf=val(mid$(a$(y,p1),2,1)):fl=0
  73. 750 ifleft$(a$(y,p1),1)="1"ands%(lf,p2)=0thenfl=1
  74. 760 ifleft$(a$(y,p1),1)="1"andlf=5andsl(p2)=200ands%(2,p2)=0thenfl=1
  75. 770 iffl=1thenh%(lf,p2)=1:onlfgosub1470,1380,1550,1300,1630
  76. 780 iffl=1thenq=1:return
  77. 790 next:return
  78. 800 ifp(p1)=1orq=1thenreturn
  79. 810 hm=0:fory=1to7
  80. 820 lf=val(mid$(a$(y,p1),2,1))
  81. 830 ifleft$(a$(y,p1),1)="4"andlf*25<=sl(p1)then850
  82. 840 next:goto870
  83. 850 iflf*25>hm*25andml(p1)+lf*25<1001thenhm=lf:hc=y
  84. 860 goto840
  85. 870 ifhm=0thenreturn
  86. 880 forl=1tohm:gosub1850:next:y=hc:q=1:return
  87. 890 ifq=1thenreturn
  88. 900 fory=1to7
  89. 910 lf=val(mid$(a$(y,p1),2,1)):fl=0
  90. 920 ifleft$(a$(y,p1),1)="2"andh%(lf,p1)=1andlf<5thenfl=1
  91. 930 ifleft$(a$(y,p1),1)="2"andlf=5andh%(5,p1)=1andp(p1)=0thenfl=1
  92. 940 iffl=1thenh%(lf,p1)=0:onlfgosub1510,1420,1590,1340,1710
  93. 950 iffl=1thenq=1:return
  94. 960 next:return
  95. 970 ifq=1then1120
  96. 980 fory=1to7:lf=val(mid$(a$(y,p1),2,1))
  97. 990 ifleft$(a$(y,p1),1)="2"ands%(lf,p1)=1then1110
  98. 1000 next:fory=1to7:lf=val(mid$(a$(y,p1),2,1))
  99. 1010 ifleft$(a$(y,p1),1)="1"ands%(lf,p2)=1then1110
  100. 1020 next:fory=1to7:forx=1to7
  101. 1030 ifa$(y,p1)=a$(x,p1)thennc=nc+1
  102. 1040 next:ifnc>2thennc=0:goto1110
  103. 1050 nc=0:next:nc=0:fory=1to7
  104. 1060 ifleft$(a$(y,p1),1)="4"andval(mid$(a$(y,p1),2,1))*25<101then1110
  105. 1070 next:fory=1to7:forx=1to7
  106. 1080 ifa$(y,p1)=a$(x,p1)thennc=nc+1
  107. 1090 next:ifnc>1thennc=0:goto1110
  108. 1100 nc=0:next:nc=0:y=int(rnd(1)*7)+1
  109. 1110 b$(zy)=a$(y,p1):zy=zy+1
  110. 1120 gosub700:goto650
  111. 1130 co=co+1:ifco<>zz+1thenreturn
  112. 1140 zz=zy-1:zy=1:co=1
  113. 1150 syste,"shuffling the deck...",72,104
  114. 1152 fori=1tozz:r=int(rnd(1)*zz)+1
  115. 1160 :
  116. 1170 ifb$(r)<>"1"thenc$(i)=b$(r):b$(r)="1":nexti:syste,sp$,16,104:return
  117. 1180 r=r+1:ifr=zz+1thenr=1
  118. 1190 goto1170
  119. 1200 data4841,1427,2331,3136,2133,4343,4442,1230
  120. 1210 data1128,2235,2534,4442,4343,2235,1529,4244,4145,1326,4343,4442,2534
  121. 1220 data2331,1529,4145,4244,4244,4841,2133,1230,3338,2331,4343,4442,2432
  122. 1230 data1529,2432,2331,2235,4244,4442,4343,4442,4145,4244,1529,1128
  123. 1240 data2534,3237,1326,2235,4343,4841,4442,4145,1230,4244,2432,3439
  124. 1250 data2534,2235,1128,4442,4343,2534,2133,4145,4244,4442,4343,2432
  125. 1260 data2534,2331,2235,1230,1427,2235,1326,2235,2235,4343,4442,2331
  126. 1270 data2235,2133,1230,4145,4841,4442,4343,2133,2235
  127. 1280 data4145,2235,2432,2133,4244,4145,4244,4442,4145,1427,2235,2432
  128. 1290 data4244,4145,2235
  129. 1300 rem******flattire******
  130. 1310 gosub1380:p(p2)=1
  131. 1320 xp=3:yp=3+(p2-1)*14:goto10000
  132. 1330 :
  133. 1340 rem*****fixtheflat*****
  134. 1350 gosub1420:p(p1)=0
  135. 1360 xp=3:yp=3+(p1-1)*14:goto10035
  136. 1370 :
  137. 1380 rem****redlight*****
  138. 1390 p(p2)=1:forx=stos+24:pokex,0:next:pokes+24,15:p(p2)=1:gosub10190
  139. 1400 xp=30:yp=2+(p2-1)*14:sh=1:gosub2220
  140. 1405 fordl=1to200:next
  141. 1410 return
  142. 1420 rem****grnlight*****
  143. 1422 foraa=1to4:ifh%(aa,p1)<>0thenreturn
  144. 1423 next
  145. 1430 p(p1)=0:forx=stos+24:pokex,0:next:pokes+24,15:p(p1)=0:gosub10205
  146. 1440 xp=30:yp=2+(p1-1)*14:sh=2:ifsl(p1)=75thensh=50
  147. 1450 gosub2220
  148. 1455 fordl=1to200:next
  149. 1460 return
  150. 1470 rem****accident****
  151. 1480 gosub1380:p(p2)=1
  152. 1490 xp=8:yp=5+(p2-1)*14:goto10125
  153. 1500 :
  154. 1510 rem*****repairs*****
  155. 1520 gosub1420:p(p1)=0
  156. 1530 xp=8:yp=5+(p1-1)*14:goto10160
  157. 1540 :
  158. 1550 rem****nogas*****
  159. 1560 gosub1380:p(p2)=1
  160. 1570 xp=8:yp=2+(p2-1)*14:goto10055
  161. 1580 :
  162. 1590 rem*****fillup*****
  163. 1600 gosub1420:p(p1)=0
  164. 1610 xp=8:yp=2+(p1-1)*14:goto10090
  165. 1620 :
  166. 1630 rem*****speedlimit****
  167. 1640 sl(p2)=75:sh=50:xp=30:yp=2+(p2-1)*14:gosub2220:pokes+5,0:pokes+6,0
  168. 1645 xp=267:yp=25+(p2-1)*112
  169. 1650 forsl=200to75step-5:sl$=mid$(str$(sl),2)
  170. 1655 pokes+1,sl:pokes+4,17:pokes+4,0
  171. 1660 iflen(sl$)<3thensl$=" "+sl$:goto1660
  172. 1670 syste,sl$,xp,yp:syste,"   ",xp,yp
  173. 1680 next
  174. 1690 syste," 75",xp,yp
  175. 1700 return
  176. 1710 rem****endlimit*****
  177. 1720 sl(p1)=200:sh=2:xp=30:yp=2+(p1-1)*14:gosub2220:pokes+5,0:pokes+6,0
  178. 1725 xp=267:yp=25+(p1-1)*112
  179. 1730 forsl=75to200step5:sl$=mid$(str$(sl),2)
  180. 1732 pokes+1,sl:pokes+4,17:pokes+4,0
  181. 1740 iflen(sl$)<3thensl$=" "+sl$:goto1740
  182. 1750 syste,sl$,xp,yp:syste,"   ",xp,yp
  183. 1760 next
  184. 1770 syste,"200",xp,yp:sh=2:xp=30:yp=2+(p1-1)*14:gosub2220
  185. 1780 return
  186. 1790 rem*****drawcardshere*****
  187. 1800 xp=2:yp=11:fori=1to7:sh=val(right$(a$(i,p1),2)):gosub2220:xp=xp+5:next
  188. 1810 return
  189. 1820 rem*****getcardsoff*****
  190. 1830 xp=2:yp=11:fori=1to7:sh=40:gosub2220:xp=xp+5:next
  191. 1840 return
  192. 1850 rem*****mileagebox*****
  193. 1860 ml(p1)=ml(p1)+25:m$(p1)=mid$(str$(ml(p1)),2)
  194. 1870 iflen(m$(p1))<=3thenm$(p1)="0"+m$(p1):goto1870
  195. 1880 xp=16:yp=0+(p1-1)*14:t=20:ifrnd(1)<.1thent=57
  196. 1882 ifml(p1)=1000thent=51
  197. 1884 forx=stos+24:pokex,.:next
  198. 1890 forsh=ttot+5:poke54296,0:poke54296,15
  199. 1900 gosub2220:ift=51thenfordl=1to10:next
  200. 1910 next:ift=51thenfordl=1to1000:next:goto1930
  201. 1920 sh=20:gosub2220:syste,m$(p1),136,(p1-1)*112+57
  202. 1930 return
  203. 1940 xp=l*5+2:yp=11:fort=1to5:sh=40:gosub2220:sh=lf+35:gosub2220:next
  204. 1950 rem****blinkcard****
  205. 1960 iflf=1thensh=16:xp=3:yp=9+(p1-1)*14:gosub2220
  206. 1970 iflf=1thenifh%(1,p1)=1thenh%(1,p1)=0:gosub1510:goto2050
  207. 1975 rem    iflf=2thensys51459:print"[147]"lf,h%(2,p1),h%(5,p1):stop
  208. 1980 iflf=2thensh=17:xp=10:yp=9+(p1-1)*14:gosub2220
  209. 1990 iflf=2thenifh%(2,p1)=1thenh%(2,p1)=0:gosub1420
  210. 2000 iflf=2andh%(5,p1)=1thenh%(5,p1)=0:gosub1710:goto2050
  211. 2010 iflf=3thensh=18:xp=19:yp=9+(p1-1)*14:gosub2220
  212. 2020 iflf=3thenifh%(3,p1)=1thenh%(3,p1)=0:gosub1590:goto2050
  213. 2030 iflf=4thensh=19:xp=26:yp=9+(p1-1